﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>采收 采收 月+采收人 汇总</title>
    <style type="text/css">
        .auto-style1 {
            width: 40px;
        }

        #tableArea .dataTables_wrapper {
            position: relative;
            clear: both;
            zoom: 1;
            overflow-x: auto;
        }

        #tableArea table {
            width: 100%;
        }
    </style>
</head>
<body>
    <div class="pd-5">
        <div class="text-c" id="findfdiv">
            <div class="formControls col-2">
                <span class="select-box">
                    <select class="select" size="1" name="finddatabranchid_dn" id="finddatabranchid">
                    </select></span>
            </div>
            <div class="formControls col-8">
                采收时间：
            <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM'})" id="findworkmt_times" name="findworkmt_times" class="input-text Wdate" style="width: 150px;">
                -
            <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM'})" id="findworkmt_timee" name="findworkmt_timee" class="input-text Wdate" style="width: 150px;">
      
                <input type="text" class="input-text" placeholder="人员" style="width: 90px;" id="findworkusername" name="findworkusername">

            </div>
            <button onclick="findreolad()" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 查询</button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-5">
            <span class="l">
                <button onclick="method5('tablelist')" class="btn btn-secondary  round" id="Button1" name=""><i class="Hui-iconfont">&#xe644;</i>导出</button></span>
            <span class="r">提示：v采收报表<strong>^_^</strong> </span>

        </div>
        <div class="mt-5 ml-20" id="tableArea">
            <table class="table table-border table-bordered table-striped table-hover" id="tablelist">
                <thead>
                    <tr class="text-c">
                        <th width="30"><a id="hcmtable_sall" onclick="hcmtable_sall();" href="javascript:;" title="全选反选"><i class="Hui-iconfont">&#xe608;全</i></a></th>
                        <th>日期</th>
                    <!--    <th>品种</th>-->
                        <th> 总框数 </th>
                        <th>总采收</th>
                        <th> 总入库量  </th>
                        <th>总扣数</th> <th>采收人</th> <th>基地</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../lib/datatables/1.10.0/jtable.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_list.js"></script>
    <script type="text/javascript">
        function getDateByChange(date, days) {
            if (days == undefined || days == '') {
                days = 1;
            }
            var date = new Date(date);
            date.setHours(date.getHours() - days);
            return date;

        }
        //基地
        // hcdoselbyPost("BranchID as id,BranchName as name", "mrbranch", "type='本部'", "", "", "id", function (data) { SetSelectWithArrayIdName("#finddatabranchid", data); });
        $("#findworkmt_times").val((getDateByChange(new Date(), 24 * 1)).Format("yyyy-MM"));
        $(function () {
            hcui_ajaxasync = false;
            spsetBaseNoBt("v采收汇总月人", "id", "v采收汇总月人 as T", "*", "#tablelist", "sctaskinway", "运输管理", "sctaskinway");
            hcdoselbyPost("BranchID as id,BranchName as name", "mrbranch", "type='本部'", "", "", "id", function (data) {
                SetSelectWithArrayIdName("#finddatabranchid", data);
                $("#finddatabranchid").val(HCUser.HCUorg);
            });
            hcmtable = $("#tablelist").DataTable({
                "serverSide": true,//服务端处理分页 无法使用当前查找
                "bFilter": false,  //是否使用内置的过滤功能
                "bInfo": true, "fnDrawCallback": function () { dTappendSkipPage(); },
                "bLengthChange": false, //改变每页显示数据数量
                "ajax": {
                    "type": "POST",
                    "url": spselUrl() + "&sporderby= workmt desc ",
                    "data": function (d) {
                        $("#findfdiv").find("input[type='text']").each(function () {
                            d[this.id] = $(this).val();
                        });
                        $("#findfdiv").find("select").each(function () {
                            d[this.id] = $(this).val();
                        });

                    }
                },
                // "order": [[1, "asc"]],//默认第几个排序
                aLengthMenu: [10, 60, 100],
                "columns": [
                    { "data": "rowhcindex" }, { "data": "workmt" }, { "data": "kcount" }, { "data": "getcount" }, { "data": "incount" }, { "data": "gscount" }, { "data": "workusername" }, { "data": "databranchname" }
                ],
                "columnDefs": [
           //           {
           //               "targets": [1],
           //               "render": function (data, type, row) {
           //                   return data + "/" + row.采收人;
           //               }
           //           },
           //{
           //    "targets": [3],
           //    "render": function (data, type, row) {
           //        return data + "/" + row.类型 + "/" + row.地块;
           //    }
           //},
           //{
           //    "targets": [4],
           //    "render": function (data, type, row) {
           //        return data + "/" + row.负责人;
           //    }
           //},
                   {
                       "orderable": false,
                       "targets": [0, 1, 2]
                   }

                ]
            });
        });

    </script>
</body>
</html>
